﻿using ModelLayer;
using System;
using System.ServiceModel;
using WcfBetterPlace.WcfData;

namespace WcfBetterPlace
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name
    //       "IBetterAdminService" in both code and config file together.
    [ServiceContract]
    public interface IBetterAdminService
    {
        #region Customer services

        [OperationContract]
        IntData CreateCustomer(Customer customer);

        [OperationContract]
        PersonData GetCustomer(long id);

        [OperationContract]
        IntData UpdateCustomer(Customer customer);

        [OperationContract]
        IntData DeleteCustomer(long customerId);

        [OperationContract]
        PersonList GetAllCustomers();

        #endregion Customer services

        #region Reservation services

        [OperationContract]
        ReservationData CreateReservationUsingDijkstras(long startStationId, long endStationId, long customerId, DateTime date);

        [OperationContract]
        ReservationData CreateReservationUsingAStar(long startStationId, long endStationId, long customerId, DateTime date);

        [OperationContract]
        ReservationData GetReservation(long id);

        [OperationContract]
        ReservationList GetAllReservations();

        [OperationContract]
        IntData UpdateReservation(Reservation resv);

        [OperationContract]
        IntData CancelReservation(long resvId);

        #endregion Reservation services

        #region Station services

        [OperationContract]
        void AddBattery(long id);

        [OperationContract]
        bool RemoveBattery(long id);

        [OperationContract]
        IntData GetBatteries(long id);

        [OperationContract]
        void SetBatteries(long id, int number);

        [OperationContract]
        IntData CreateStation(Station station);

        [OperationContract]
        StationData GetStation(long id);

        [OperationContract]
        IntData UpdateStation(Station station);

        [OperationContract]
        IntData DeleteStation(long stationId);

        [OperationContract]
        StationList GetAllStations();

        #endregion Station services

        #region Edge services

        [OperationContract]
        EdgeList GetAllEdges();

        [OperationContract]
        EdgeList GetStationEdges(long id);

        [OperationContract]
        IntData CreateEdge(Edge edge);

        [OperationContract]
        IntData DeleteEdge(long station1, long station2);

        #endregion Edge services

        #region City Service

        [OperationContract]
        CityData GetCityFromPostalCode(int postalCode);

        [OperationContract]
        CityData GetCityFromName(string cityName);

        #endregion City Service
    }
}